package com.sgb.kjwl.model.entity.self;

import android.text.TextUtils;

import com.google.gson.annotations.SerializedName;

/**
 * Describe:    货源订阅列表数据实体类
 * Author:  YangLei
 * Date:    2021/4/12
 */
public class BusinessSubscribeEntity {

    //信息费
    private String messagePrice;
    //货源no
    private String no;

    //发货地省
    private String provinceName;
    //市
    private String cityName;
    //地区
    private String districtName;
    //详细地址
    private String detailAddress;

    //目的地省
    private String destProvinceName;
    //市
    private String destCityName;
    //区
    private String destDistrictName;

    //货物类型名称
    private String goodsModelName;
    //货物重量(吨)
    private String weight;
    //体积
    private String volume;

    //装货时间
    private Long shipmentTime;

    //装货结束时间
    private Long shipmentEndTime;

    //运费
    private String freight;

    //运费总价
    private String allFreight;

    //公司名称
    private String companyName;
    //公司No
    private String companyNo;
    //团队名称
    private String teamName;
    //团队No
    private String teamNo;
    private String userName;

    //联系人
    private String contrcts;

    //联系人电话
    private String contrctsNumber;

    //是否报价 0 未报价 1 已报价
    private Integer offerStatus;

    //车型
    private String carTypeName;

    //车长
    private String carLenName;

    //经纬度
    private String[] location;

    //货源发布模式 0 普通模式  1 竞价模式
    private String pattern;

    //状态 0 待接单（接单中）/竞价中  1 已成交/已转订单   2 已结束/待处理
    private int state;

    //订单no
    private String orderNo;

    //经度
    private String longitude;

    //纬度
    private String latitude;

    //栏高
    private String heightHurdle;

    //是否自卸  0 否  1 是
    private Integer isDump;

    //判断是否别人的订单
    private Integer isOther;

    //货主编号
    private String userNo;

    //网易云信账号
    private String imAccount;
    //网易云信token
    private String imToken;
    //货源联系人IM账号
    private String contrctsImAccount;

    //货源发布类型——1：企业发布 / 2：团队发布 / 3:个人发布
    private String terminal;

    //运程
    private String journey;
    //头像
    @SerializedName(value = "logo", alternate = {"companyLogo"})
    private String logo;

    /**
     * 运费选项 0一口价 1电议
     */
    private Integer freightType;

    /**
     * 运输方式 0 零担 1 整车
     */
    private Integer transportType;

    /**
     * 装车开始时间点  2.0.6
     * 25——表示全天
     */
    private int startPointTime;

    /**
     * 装车结束时间点  2.0.6
     * 25——表示全天
     */
    private int endPointTime;

    //2.0.8新增
    private String offerType;
    private String secondGoodsTypeName;


    public Integer getFreightType() {
        return freightType;
    }

    public void setFreightType(Integer freightType) {
        this.freightType = freightType;
    }

    public Integer getTransportType() {
        return transportType;
    }

    public int getStartPointTime() {
        return startPointTime;
    }

    public void setStartPointTime(int startPointTime) {
        this.startPointTime = startPointTime;
    }

    public int getEndPointTime() {
        return endPointTime;
    }

    public void setEndPointTime(int endPointTime) {
        this.endPointTime = endPointTime;
    }

    public void setTransportType(Integer transportType) {
        this.transportType = transportType;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getMessagePrice() {
        return messagePrice;
    }

    public void setMessagePrice(String messagePrice) {
        this.messagePrice = messagePrice;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getDistrictName() {
        return districtName;
    }

    public void setDistrictName(String districtName) {
        this.districtName = districtName;
    }

    public String getDetailAddress() {
        return detailAddress;
    }

    public void setDetailAddress(String detailAddress) {
        this.detailAddress = detailAddress;
    }

    public String getDestProvinceName() {
        return destProvinceName;
    }

    public void setDestProvinceName(String destProvinceName) {
        this.destProvinceName = destProvinceName;
    }

    public String getDestCityName() {
        return destCityName;
    }

    public void setDestCityName(String destCityName) {
        this.destCityName = destCityName;
    }

    public String getDestDistrictName() {
        return destDistrictName;
    }

    public void setDestDistrictName(String destDistrictName) {
        this.destDistrictName = destDistrictName;
    }

    public String getGoodsModelName() {
        return goodsModelName;
    }

    public void setGoodsModelName(String goodsModelName) {
        this.goodsModelName = goodsModelName;
    }

    public String getWeight() {
        return weight;
    }

    public void setWeight(String weight) {
        this.weight = weight;
    }

    public String getVolume() {
        return volume;
    }

    public void setVolume(String volume) {
        this.volume = volume;
    }

    public Long getShipmentTime() {
        if (shipmentTime == null) {
            return 0l;
        } else
            return shipmentTime;
    }

    public void setShipmentTime(Long shipmentTime) {
        this.shipmentTime = shipmentTime;
    }

    public Long getShipmentEndTime() {
        if (shipmentEndTime == null) {
            return 0l;
        } else
            return shipmentEndTime;
    }

    public void setShipmentEndTime(Long shipmentEndTime) {
        this.shipmentEndTime = shipmentEndTime;
    }

    public String getFreight() {
        return freight;
    }

    public void setFreight(String freight) {
        this.freight = freight;
    }

    public String getAllFreight() {
        return allFreight;
    }

    public void setAllFreight(String allFreight) {
        this.allFreight = allFreight;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getCompanyNo() {
        return companyNo;
    }

    public void setCompanyNo(String companyNo) {
        this.companyNo = companyNo;
    }

    public String getTeamName() {
        return teamName;
    }

    public void setTeamName(String teamName) {
        this.teamName = teamName;
    }

    public String getTeamNo() {
        return teamNo;
    }

    public void setTeamNo(String teamNo) {
        this.teamNo = teamNo;
    }

    public String getContrcts() {
        return contrcts;
    }

    public void setContrcts(String contrcts) {
        this.contrcts = contrcts;
    }

    public String getContrctsNumber() {
        return contrctsNumber;
    }

    public void setContrctsNumber(String contrctsNumber) {
        this.contrctsNumber = contrctsNumber;
    }

    public Integer getOfferStatus() {
        return offerStatus;
    }

    public void setOfferStatus(Integer offerStatus) {
        this.offerStatus = offerStatus;
    }

    public String getCarTypeName() {
        return carTypeName;
    }

    public void setCarTypeName(String carTypeName) {
        this.carTypeName = carTypeName;
    }

    public String getCarLenName() {
        return carLenName;
    }

    public void setCarLenName(String carLenName) {
        this.carLenName = carLenName;
    }

    public String[] getLocation() {
        return location;
    }

    public void setLocation(String[] location) {
        this.location = location;
    }

    public String getPattern() {
        return pattern;
    }

    public void setPattern(String pattern) {
        this.pattern = pattern;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getHeightHurdle() {
        return heightHurdle;
    }

    public void setHeightHurdle(String heightHurdle) {
        this.heightHurdle = heightHurdle;
    }

    public Integer getIsDump() {
        return isDump;
    }

    public void setIsDump(Integer isDump) {
        this.isDump = isDump;
    }

    public Integer getIsOther() {
        return isOther;
    }

    public void setIsOther(Integer isOther) {
        this.isOther = isOther;
    }

    public String getUserNo() {
        return userNo;
    }

    public void setUserNo(String userNo) {
        this.userNo = userNo;
    }

    public String getImAccount() {
        return imAccount;
    }

    public void setImAccount(String imAccount) {
        this.imAccount = imAccount;
    }

    public String getImToken() {
        return imToken;
    }

    public void setImToken(String imToken) {
        this.imToken = imToken;
    }

    public String getContrctsImAccount() {
        return contrctsImAccount;
    }

    public void setContrctsImAccount(String contrctsImAccount) {
        this.contrctsImAccount = contrctsImAccount;
    }

    public String getTerminal() {
        return terminal;
    }

    public void setTerminal(String terminal) {
        this.terminal = terminal;
    }

    public String getJourney() {
        return journey;
    }

    public void setJourney(String journey) {
        this.journey = journey;
    }
    public String getOfferType() {
        return offerType;
    }

    public void setOfferType(String offerType) {
        this.offerType = offerType;
    }
    public String getOfferTypeWorlds() {
        if (TextUtils.isEmpty(offerType))return "";
        StringBuffer other = new StringBuffer();
        String[] strArray = offerType.split(",");
        for (int i = 0;i<strArray.length;i++){
            if ("1".equals(strArray[i])){
                other.append("企业");
            }else if ("2".equals(strArray[i])){
                if (other.length()!=0){
                    other.append("/");
                }
                other.append("团队");
            }else if ("3".equals(strArray[i])){
                if (other.length()!=0){
                    other.append("/");
                }
                other.append("个人（司机）");
            }
        }
        return other.toString();
    }

    public String getSecondGoodsTypeName() {
        return secondGoodsTypeName;
    }

    public void setSecondGoodsTypeName(String secondGoodsTypeName) {
        this.secondGoodsTypeName = secondGoodsTypeName;
    }
}
